import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:get/get_core/src/get_main.dart';
import 'package:get/get_state_manager/src/simple/get_controllers.dart';

import '../../style/widget_style.dart';

class DocTransViewController extends GetxController {
  @override
  void onInit() {
    super.onInit();
  }

  @override
  void onReady() {
    super.onReady();
  }

  @override
  void onClose() {
    super.onClose();
  }


  void showPoupWindow(BuildContext context) {
    showModalBottomSheet(
        context: context,
        builder: (context) => StatefulBuilder(
          builder: (context, setState) {
            return SafeArea(child: Container(
              color: Colors.white,
              child: Column(
                children: [
                  Image.asset('assets/images/icon_audio_wave_realtime.png',width: Get.width),
                  SizedBox(height: 14.h,),
                  Row(
                    children: [
                      Expanded(child: Container(
                        child: Column(
                          children: [
                            Stack(
                              children: [
                                Container(
                                  width: 40.w,
                                  height: 40.h,
                                  decoration: BoxDecoration(
                                      shape: BoxShape.circle,
                                      color: Colors.red
                                  ),
                                ),
                                Container(
                                  margin: EdgeInsets.only(left: 13.w,top: 13.h),
                                  width: 12.w,
                                  height: 12.h,
                                  decoration: BoxDecoration(
                                      shape: BoxShape.rectangle,
                                      color: Colors.white
                                  ),
                                )
                              ],
                            ),
                            SizedBox(height: 10.h,),
                            Text('结束录音',style: AppStyleThemeData.HINT_TEXT_STYLE_small,)
                          ],
                        ),
                      ),flex: 1,),
                      Expanded(child: Container(
                        child: Column(
                          children: [
                            Image.asset('assets/images/icon_play_realtime_btn_running.png',width: 48.w,height: 48.h,),
                            SizedBox(height: 10.h,),
                            Text('00:05')
                          ],
                        ),
                      ),flex: 1,),
                      Expanded(
                        child: Container(
                          child: Column(
                            children: [
                              Text('英-中',style: AppStyleThemeData.HINT_TEXT_STYLE,),
                              SizedBox(height: 10.h,),
                              Text('语言',style: AppStyleThemeData.HINT_TEXT_STYLE_small,)
                            ],
                          ),
                        ),
                        flex: 1,
                      ),
                      Expanded(
                        child: Container(
                          child: Column(
                            children: [
                              Image.asset('assets/images/icon_record_script_bottom_flag.png',width: 24.w,height: 24.h),
                              SizedBox(height: 10.h,),
                              Text('语言',style: AppStyleThemeData.HINT_TEXT_STYLE_small,)
                            ],
                          ),
                        ),
                        flex: 1,
                      )

                    ],
                  )
                ],
              ),
            ));
          },
        ),
        backgroundColor: Colors.white.withValues(alpha: 0.5),
        shape: RoundedRectangleBorder(
          borderRadius: BorderRadius.vertical(
            top: Radius.zero, // 顶部直角
          ),
        ),
        barrierColor: Colors.black.withValues(alpha: 0.1)
    );
  }

}